package com.kaili.finance.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.finance.pojo.dto.account.FinAccountUpdateDTO;
import com.kaili.finance.pojo.entity.FinAccountDetail;
import com.kaili.finance.pojo.entity.FinRecharge;
import com.kaili.finance.pojo.entity.FinTransferAcccounts;
import com.kaili.finance.pojo.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by lsw on 18-5-17.
 */
@Mapper
public interface AccountMapping{
    public List<FinAccountInfoVO> queryAccountByLike(@Param("accountName")String accountName);
    //查询未开户的网点名称
    public List<FinNewAccountInfoVO> queryAccountNameByLike(@Param("accountName") String accountname);
    //根据id返回账户信息
    public List<FinAccountDetailVO> queryAccountById(Page<FinAccountDetailVO> page,@Param("accountId") Long accountId);

    public FinLoginAccountVO queryAccountByLogin(Integer loginId);

    public void addTransfer(FinTransferAcccounts fInAdjustVO);

    public void finAdjustInput(String inputId);

    public void addRechargeWithdraw(FinRecharge finRechargeWithdrawVO);

    public void updateAccountBalance(String inputId);
    //自动生成账户Id
    public Long autoCreateAccountId();
    //根据账户id查询账户类型
    public Integer queryAccountType(Long accountId);
    //根据账户id查询账户余额
    public Double queryAccountBanlance(Long accountId);
    //查询充值/提现记录
    public List<FinRechargeVO> queryRechargeWithdrawRecord(Page<FinRechargeVO> page, @Param("accountId") Long accountId,
                                                                   @Param("type") Integer type);
    //查询转账记录
    List<FinTransferAccountsDetailVO> queryAdjustRecord(Page<FinTransferAccountsDetailVO> page, @Param("inAccountId") Long inAccountId,
                                                                @Param("outAccountId")Long outAccountId);
    //add xinglei 网点名称模糊查询
    public List<FinSiteVO> querySiteNameByLike(@Param("siteId") String siteId, @Param("siteName")String siteName);

    public void addAccount(FinAccountDetail finAccountVO);

    public Integer updateAccount(FinAccountUpdateDTO finAccountVO);
}
